<template>
    <header>
        <div class="head">
            <div class="icon" @click="back"></div>
            <div class="title">
                <slot name="head-title"></slot>
            </div>
        </div>
    </header>
</template>

<script>
export default {
    name: "innerHeader",
    methods: {
        back() {
            this.$router.go(-1);
        }
    }
}
</script>

<style lang="scss" scoped>
header {
    width: 100%;
    background-color: #171717;
    color: white;
    overflow: hidden;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    z-index: 1000;
    .head {
        width: 100%;
        height: 80px;
        display: flex;
        background-color: #171717;
        align-items: center;
        position: fixed;
        .icon {
            width: 25px;
            height: 25px;
            background-image: url(../assets/ui/arrow_left.png);
            background-position: center;
            background-size: contain;
            border-radius: 50%;
            margin-left: 15px;
            position: absolute;
        }
        .title {
            height: 100%;
            display: flex;
            align-items: center;
            margin: 0 auto;
            span {
                display: block;
                font-size: 25px;
            }
        }
    }
}

</style>